/*
 *    Copyright (c) 2018-2025, boss All rights reserved.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions are met:
 *
 * Redistributions of source code must retain the above copyright notice,
 * this list of conditions and the following disclaimer.
 * Redistributions in binary form must reproduce the above copyright
 * notice, this list of conditions and the following disclaimer in the
 * documentation and/or other materials provided with the distribution.
 * Neither the name of the boss developer nor the names of its
 * contributors may be used to endorse or promote products derived from
 * this software without specific prior written permission.
 * Author: boss
 */

package com.hopes.bizz.close.visitor.entity;

import com.baomidou.mybatisplus.annotation.*;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.hopes.bizz.close.common.constant.enums.ParkCloseModDictEnum;
import com.hopes.bizz.close.common.constant.enums.ParkCloseSysDictEnum;
import com.hopes.boss.admin.api.resolver.DictResolver;
import com.hopes.boss.admin.api.resolver.enums.AdminDictEnum;
import com.hopes.boss.common.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;
import java.io.Serializable;
import java.time.LocalDateTime;
import java.util.Date;

/**
 * 普通车辆进出台账
 *
 * @author pig
 * @date 2023-10-26 14:08:35
 */
@Data
@TableName(value = "closed_general_car_record", excludeProperty = "tenantId")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "普通车辆进出台账")
public class ClosedGeneralCarRecordEntity extends BaseEntity {

    private static final long serialVersionUID = 1L;


	/**
	* ID
	*/
    @TableId(type = IdType.ASSIGN_ID)
    @Schema(description="ID")
    private Long id;


	/**
	 * 到访企业
	 */
	@Schema(description="到访企业")
	private Long orgId;

	/**
	* 车辆ID
	*/
    @Schema(description="车辆ID")
    private String carId;

	/**
	* 车牌号
	*/
    @Schema(description="车牌号")
    private String licencePlateNumber;

	/**
	* 车主姓名
	*/
    @Schema(description="车主姓名")
    private String carOwnerName;

	/**
	* 车主电话
	*/
    @Schema(description="车主电话")
    private String carOwnerPhone;

	/**
	* 通行方式
	*/
    @Schema(description="通行方式")
    private Integer passType;

	/**
	* 车辆类型
	*/
    @Schema(description="车辆类型")
    private Integer carType;

	/**
	* 卡口ID
	*/
    @Schema(description="卡口ID")
    private Long gateId;

	/**
	* 车牌图片
	*/
    @Schema(description="车牌图片")
    private String platePicUrl;

	/**
	* 车辆图片
	*/
    @Schema(description="车辆图片")
    private String vehiclePicUrl;

	/**
	* 进出时间
	*/
    @Schema(description="进出时间")
    private Date inOutTime;

	/**
	* 进出方式
	*/
    @Schema(description="进出方式")
    private String inOutMethod;

	/**
	* 方向
	*/
    @Schema(description="方向")
    private Integer direction;


    public String getOrgIdStr() {
    	return DictResolver.getItemLabelByValue(AdminDictEnum.sys_company, this.getOrgId());
	}

	public String getGateIdStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseModDictEnum.closed_gate, this.getGateId());
	}

	public String getCarTypeStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_general_car_type, this.getCarType());
	}

	public String getPassTypeStr() {
    	return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_general_car_pass_type, this.getPassType());
	}

	public String getDirectionStr() {
		return DictResolver.getItemLabelByValue(ParkCloseSysDictEnum.close_visitor_record_direction_type, this.getDirection());
	}


}
